﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace WorldOfMUDra
{
    public class Sign: IItem
    {
        string name;
        public string Name
        {
            get { return (name + " (" + id + ")"); }
        }
        string description;
        string id;
        public string ID
        {
            get { return id; }
        }
        public string Description
        {
            get
            {
                return description;
            }
        }
        string list_description;
        bool pickupable;
        public bool Obtainable
        {
            get { return pickupable; }
        }
        bool bound;

        public Sign(string nameoffile)
        {
            XmlTextReader reader = new XmlTextReader(nameoffile);
            while (reader.Read())
            {
                switch (reader.NodeType)
                {
                    case XmlNodeType.Element:
                        switch (reader.Name.ToLower())
                        {
                            case "name":
                                this.name = reader.ReadString().Trim();
                                break;
                            case "id":
                                this.id = reader.ReadString().Trim();
                                break;
                            case "listdescription":
                                this.list_description = reader.ReadString().Trim();
                                break;
                            case "description":
                                this.description = reader.ReadString().Trim();
                                break;
                        }
                        break;
                }
            }
        }

        public void OnFirstPickUp(Player p)
        {

        }

        public void OnPickUp(Player p)
        {

        }

        public void OnLook(Player looker)
        {

        }
    }
}
